package cn.cdutetc.library.mapper;

import cn.cdutetc.library.entity.pojo.Borrow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * 借阅信息Mapper接口
 */
@Mapper
public interface BorrowMapper extends BaseMapper<Borrow> {
    
    /**
     * 统计指定时间范围内有借阅记录的用户数量
     * @param startDate 开始时间
     * @return 活跃用户数量
     */
    Long selectActiveUsersCount(@Param("startDate") LocalDateTime startDate);
}